export let IS_MOBILE = getDevice() === 'mobile'

export function getDevice() {
  if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) || document.body.clientWidth < 500) {
    return 'mobile'
  } else {
    return 'pc'
  }
}
